# _*_ coding: UTF-8 _*_
# @Time     : 2021/11/4 15:23
# @Author   : yangshuaishuai
# @Site     : http://www.hzdledu.cn/
# @File     : qw.py
# @Software : PyCharm

from selenium import webdriver
import time


def foo1():
    driver = webdriver.Chrome()
    driver.maximize_window()
    driver.get('http://192.168.6.189/cloud/#/open/login')
    driver.find_element_by_xpath('//*[@id="account"]/input').clear()
    driver.find_element_by_xpath('//*[@id="account"]/input').send_keys('admin')
    driver.find_element_by_xpath('//*[@id="password"]/input').clear()
    driver.find_element_by_xpath('//*[@id="password"]/input').send_keys('123456')
    driver.find_element_by_xpath('//*[@id="authCode"]/div/input').send_keys('8888')
    driver.find_element_by_xpath('//*[@id="root"]/div/div[1]/form/div[5]/div/div/span/button').click()
    time.sleep(5)
    driver.find_element_by_xpath('//*[@id="root"]/section/aside/div/ul/li[1]/div').click()
    time.sleep(5)

    driver.quit()

if __name__ == '__main__':
    foo1()
